package com.credithc.eagleeye.api.constants;
/**
 * 描 述: 返回值枚举<br/>
 * 作 者: zhangjin<br/>
 * 创 建：2018年02月07日<br/>
 * 版 本：v1.0.0<br>
 * <p>
 * 历 史: (版本) 作者 时间 注释 <br/>
 */
public enum ResponseCodeEnum {
    /**
     * 系统错误编码枚举
     */
    SUCCESS("0000", "成功"),
    ERROR_AUTH_TOKEN("9001","无效token"),
    ERROR_REQUEST_PARAMETER("9002","请求参数错误"),
    ERROR_API_NOT_FOUND("9003","接口不存在"),
    ERROR_NOT_SUPPORT_PLATFORM("9005","接口不支持该平台"),
    ERROR_SWITCH_APP_UPGRADE_VERSION("9006","您当前使用的APP版本不支持此功能，请升级到最新的版本"),
    ERROR_SWITCH_DISABLED_SINGLE("9007","此功能暂时关闭，请您稍后再试"),
    ERROR_SWITCH_DISABLED_ALL("9008","系统正在维护，请您稍后再试"),
    ERROR_CAPTCHA("9010","验证码错误"),
    ERROR_ICE("9011","ICE调用错误"),
    ERROR_PASSWORD_WRONG_MORE_TIME("9012","密码错误次数较多,请您稍后再试"),
    ERROR_USER_PHONE_IS_WRONG("9013","手机号码有误，请重新输入"),
    ERROR_SYSTEM("9999", "系统异常");

    private String value;
    private String desc;
    private ResponseCodeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }
    public String getValue() {
        return value;
    }
    public String getDesc() {
        return desc;
    }
    public static ResponseCodeEnum getEnum(String value) {
        for(ResponseCodeEnum a : values()) {
            if (a.value.equals(value)) {
                return a;
            }
        }
        throw new IllegalArgumentException("No enum value '" + value + "'. " + ResponseCodeEnum.class);
    }
}
